//
// Created by Administrator on 2021/11/3.
// May Saint Diana bless you!
//
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <climits>

using namespace std;

class Solution {
public:
    int minCount(vector<int> &coins) {
        int ans = 0;
        for (const int &x: coins) {
            if (x % 2)
                ans += x / 2 + 1;
            else
                ans += x / 2;
        }
        return ans;
    }
};

int main() {
    vector<int> coins{4, 2, 1};
    Solution solution;
    cout << solution.minCount(coins) << endl;
    return 0;
}
